//
//  Track.h
//  NXTRemoteController
//
//  Created by naceka on 14.05.12.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "GestureView.h"
#import "Robot.h"
#import "TrackManager.h"
@interface Track : UIView<TrackManagerDelegate, UITextFieldDelegate> {
	//view for track painting
	GestureView * gestureView;
	
	//robot =)
	Robot * robot;
	
	//manager, that will move robot
	TrackManager * trmanager;
	
	//state
	bool started;
	
	//btn Start/Stop
	UIButton * startStop;
	
	//textfields
	UITextField * timeForwardTF, * timeLeftTF, * timeRightTF, * timeTurnTF;
}

- (id) initWithFrame:(CGRect)frame andRobot:(Robot *) r;
- (IBAction) startStopPressed:(id) sender;
//when robot stopped
- (void) robotStopped;

//UITextFieldDelegate
- (BOOL)textFieldShouldReturn:(UITextField *)textField;

//ui
- (UITextField *) createUITextFieldX:(float) x Y:(float) y W:(float) w H:(float) h AndText:(NSString *) s;
- (void) createLabelX:(float) x Y:(float) y W:(float) w H:(float) h andText:(NSString *) s;
@end
